package com.nbjtjc.safe.mapper.danger;

import com.nbjtjc.safe.model.danger.DangerDistributeTarget;
import com.nbjtjc.util.MyMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DangerDistributeTargetMapper extends MyMapper<DangerDistributeTarget> {

    @Select("select danger_distribute_target.*,sys_dept.name as deptName  " +
            " from  danger_distribute_target " +
            " left join sys_dept on sys_dept.id=danger_distribute_target.dept_id" +
            " where distribute_id=#{dId}")
    List<DangerDistributeTarget> findByDistributeId(@Param("dId") int distributeId);
}